package com.yun.hibernate.domain.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;

/**
 * @ClassName User
 * @Author lulei
 * @Data 2020/2/24 20:08
 */

@Data
@ApiModel(value = "用户对象")
@NoArgsConstructor
public class User {

    @ApiModelProperty(value = "用户对象")
    @NotNull(message = "id不能为空")
    private String id;

    @ApiModelProperty(value = "用户名")
    @NotNull(message = "用户名不能为空")
    private String name;

    @ApiModelProperty(value = "用户地址")
    @NotNull(message = "用户地址不能为空")
    private String address;

    @ApiModelProperty(value = "用户电话")
    private String number;

    @ApiModelProperty(value = "用户邮箱不能为空")
    @NotNull(message = "用户邮箱不能为空")
    private String emal;
}
